/**
 * Title: jFamilyTree GXL graph provider
 * Description: jFamilyTree GXL provider
 * About: Designed and rewritten by Andreas Lundgren, based on the Treebolic application suite
 * Copyright: (c) 2001-2008
 * Terms of use: see license agreement at http://treebolic.sourceforge.net/en/license.htm
 * Author: Bernard Bou
 * Company: bsys
 */
package jFamilyTree.provider.xml.graph.gxl;

import jFamilyTree.model.IProvider;
import jFamilyTree.provider.xml.graph.AbstractParser;

/**
 * Provider factory for GXL provider
 * 
 * @author Bernard Bou
 */
public class Provider extends jFamilyTree.provider.xml.graph.AbstractProvider implements IProvider
{
	/*
	 * (non-Javadoc)
	 * 
	 * @see jFamilyTree.provider.graph.Provider#getSource(java.lang.String)
	 */
	public String getSource(String thisSource)
	{
		// get xml file
		String thisGxlFile = thisSource;
		if (thisGxlFile == null)
			thisGxlFile = theContext.getParameter("gxml");
		return thisGxlFile;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see jFamilyTree.provider.graph.Provider#getParser()
	 */
	@Override
	public AbstractParser getParser()
	{
		return new GxlParser();
	}
}
